﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using BudgetMealsModels.Concrete;
using System.Data.Entity;
using BudgetMealsModels.Entities;
using System.Data.Entity.Validation;
using System.Diagnostics;

namespace BudgetMealsUI.Controllers
{
    public class AdminController : Controller
    {
        public ActionResult RecalculateHashkey()
        {
            Database.SetInitializer(new DropCreateDatabaseIfModelChanges<EFDbContext>());

            using (var context = new EFDbContext())
            {
                //Forces the database to be recreated
                context.Meals.Select(m => m);
            }

            return null;
        }
    }
}
